import request from '@/utils/request'

/** ****************************订单管理*******************************************/

// 商家接口
export function getOrderList(data) {
  return request({
    url: '/v1/order/getOrderListVo?current=' + data.current + '&size=' + data.size + '&sellerId=' + data.sellerId,
    method: 'POST'
  })
}
// 平台接口
export function getSellerOrderListVo(data) {
  return request({
    url: '/v1/order/getSellerOrderListVo?current=' + data.current + '&size=' + data.size,
    method: 'POST'
  })
}

export function searchSellerOrderListVo(data, url) {
  return request({
    url: '/v1/order/getSellerOrderListVo?current=' + data.current + '&size=' + data.size + url,
    method: 'POST'
  })
}
export function searchSellerOrderListVoSeller(data, url) {
  return request({
    url: '/v1/order/getOrderListVo?current=' + data.current + '&size=' + data.size + '&sellerId=' + data.sellerId + url,
    method: 'POST'
  })
}
export function editorOrderList(data) {
  return request({
    url: '/v1/orderAddress',
    method: 'PUT',
    data: data
  })
}
export function confirmOrderList(data) {
  return request({
    url: '/v1/order/updateOrder',
    method: 'PUT',
    data: data
  })
}
export function getLogisticCompanyList() {
  return request({
    url: '/v1/logisticCompany/getLogisticCompanyList',
    method: 'GET'
  })
}

export function getShopOrderList(data) {
  return request({
    url: '/v1/newshoporder?current=' + data.current + '&size=' + data.size + data.url,
    method: 'GET'
  })
}

export function getShopOrderListSize(data) {
  return request({
    url: '/v1/newshoporder/size?size=' + data.size + data.url,
    method: 'GET'
  })
}

export function getShopOrderListMen(data) {
  return request({
    url: '/v1/newshoporder?current=' + data.current + '&size=' + data.size + data.url + '&sid=' + data.sid,
    method: 'GET'
  })
}
export function getShopOrderListSizeMen(data) {
  return request({
    url: '/v1/newshoporder/size?size=' + data.size + data.url + '&sid=' + data.sid,
    method: 'GET'
  })
}
export function deleteById(data) {
  return request({
    url: '/v1/newshoporder/deleteById',
    method: 'DELETE',
    data: data
  })
}
export function getShopOrderListQi(data) {
  return request({
    url: '/v1/newshoporder?current=' + data.current + '&size=' + data.size + data.url + '&neid=' + data.neid,
    method: 'GET'
  })
}
export function getShopOrderListSizeQi(data) {
  return request({
    url: '/v1/newshoporder/size?size=' + data.size + data.url + '&neid=' + data.neid,
    method: 'GET'
  })
}
export function updataById(data) {
  return request({
    url: '/v1/newshoporder/updataById',
    method: 'PUT',
    data: data
  })
}
export function updataByIdExamine(data) {
  return request({
    url: '/v1/newshoporder/updataByIdExamine',
    method: 'PUT',
    data: data
  })
}
export function updataByIdPayment(data) {
  return request({
    url: '/v1/newshoporder/updataByIdPayment',
    method: 'PUT',
    data: data
  })
}
export function updataByIdDeliver(data) {
  return request({
    url: '/v1/newshoporder/updataByIdDeliver',
    method: 'PUT',
    data: data
  })
}
export function updataByIdReceive(data) {
  return request({
    url: '/v1/newshoporder/updataByIdReceive',
    method: 'PUT',
    data: data
  })
}
export function updataByIdCancel(data) {
  return request({
    url: '/v1/newshoporder/updataByIdCancel',
    method: 'PUT',
    data: data
  })
}
